using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using FutureOpen.Web.Pages;
using FutureOpen.Core.func.sql;
using FutureOpen.Core.func.util;

public partial class controls_FrdList : System.Web.UI.UserControl
{
    private PageBase pbase;
    protected void Page_Load(object sender, EventArgs e)
    {
        pbase = (PageBase)this.Page;
        pbase.PageInit();

              
        if (!Page.IsPostBack)
        {
            BindUsrs(0, 20);
        }
    }   
    public void BindUsrs( int start, int end)
    {

        DataSet grps = FrdProvider.GetFriend(pbase.MyUsr);
        this.dlUsrs.DataSource = grps.Tables[0];
        this.dlUsrs.DataBind();
    }

    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindUsrs((e.NewPageIndex - 1) * 20, 20);
    }  
}

